<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<div class="pageHeader">
    <form rel="pageForm" onsubmit="return navTabSearch(this);" action="<c:url value='/lucky/list'/>" method="post">
        <div class="searchBar">
            <ul>
                <li style="float: left;line-height: 25px;">
                    <label>奖项名称：</label>
                    <input name="keywords" type="text" value="${query.keywords}"/>
                </li>
                <li>
                    <div class="buttonActive" style="margin-left:5px;">
                        <div class="buttonContent">
                            <button type="submit">查找</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<div class="pageContent" style="padding-top: 1px;">
    <div class="panelBar">
        <ul class="toolBar" style="float: left;display: inline-block;">
            <li><a class="add" href="<c:url value='/lucky/new'/>" target="dialog" width="400" height="230" mask="true"
                   resizable="false" maxable="false"><span>添加奖项</span></a></li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="114">
        <thead>
        <tr>
            <th width="40" align="center">序号</th>
            <th>奖项名称</th>
            <th>数量</th>
            <th width="40">排序</th>
            <th width="160">操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach var="lucky" items="${pager.list}" varStatus="vs">
            <tr>
                <td>${vs.count+(pager.pageNum-1)*pager.numPerPage}</td>
                <td>${lucky.name}</td>
                <td>${lucky.num}</td>
                <td>${lucky.note}</td>
                <td style="text-indent: 3px;">
                    <a href="<c:url value='/lucky/view/${lucky.id}'/>" target="dialog" rel="page_lucky_edit" width="400"
                       height="230" mask="true"
                       resizable="false" maxable="false" title="奖项编辑">编辑</a>&nbsp;

                    <a href="<c:url value='/lucky/tree/${lucky.id}'/>" target="dialog" rel="page_lucky_bind" width="500"
                       height="450"
                       mask="true"
                       resizable="false" maxable="false" title="【${lucky.name}】设置抽奖人员">全员</a>

                    <%--<a href="<c:url value='/lucky/check4/${lucky.id}'/>" target="dialog" rel="page_lucky_bind"--%>
                       <%--width="500" height="500"--%>
                       <%--mask="true"--%>
                       <%--resizable="false" maxable="false" title="【${lucky.name}】设置抽奖人员">4年人员</a>--%>

                    <a class="delete" href="<c:url value='/lucky/${lucky.id}'/>" title="确认删除奖项【${lucky.name}】？"
                       target="ajaxDel"
                    >删除</a>
                    <a href="<c:url value='/lucky/result/${lucky.id}'/>" target="dialog" rel="page_lucky_result"
                       width="600" height="750" mask="true"
                       resizable="false" maxable="false" title="中奖【${lucky.name}】人员">中奖人员</a>&nbsp;
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示&nbsp;</span>
            <select id="cob_ps" class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20">20</option>
                <option value="50">50</option>
                <option value="100">100</option>
                <option value="200">200</option>
            </select>
            <span>条，共${pager.total}条</span>
        </div>
        <div class="pagination" targetType="navTab" totalCount="${pager.total}" numPerPage="${pager.numPerPage}"
             pageNumShown="10"
             currentPage="${pager.pageNum}"></div>
    </div>
    <form id="pagerForm" method="post" action="<c:url value='/lucky/list'/>">
        <input type="hidden" name="pageNum" value="${pager.pageNum}"/>
        <input type="hidden" name="numPerPage" value="${pager.numPerPage}"/>
    </form>
</div>
